package com.lam.dormitory.mapper;

import com.lam.dormitory.entity.Dormitory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lam.dormitory.entity.DormitoryService;
import com.lam.dormitory.entity.Role;
import com.lam.dormitory.vo.DormitoryVo;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lam
 * @since 2019-12-26
 */
public interface DormitoryMapper extends BaseMapper<Dormitory> {

    /**
     * 根据dorId,buildingNo,dorNo查询宿舍信息（所包含的学生和管理员）
     * @param dormitory
     * @return
     */
    List<DormitoryVo> selectDorByDormitory(Dormitory dormitory);

    /**
     * 搜索无重复的buildingNo
     * @return
     */
    List<Dormitory> selectBuildingNo();

    /**
     * 根据buildingNo,dorNo搜索
     * @param buildingNo
     * @param dorNo
     * @return
     */
    Dormitory selectDorIdByBuildingNoAndDorNo(Integer buildingNo,Integer dorNo);
}
